<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!--
	Copyright (c) 1999-2008 by Digital Mars
	All Rights Reserved
	Written by Walter Bright
	www.digitalmars.com
  -->

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>std.boxer - D Programming Language - Digital Mars</title>
<link rel="stylesheet" type="text/css" href="./style.css">
<link rel="icon" type="image/gif" href="./holy.gif" />
</head>

<body>
<div id="heading">
	<a href="http://www.digitalmars.com/"><img src="./dmlogo.gif" width="270" height="53" border="0" alt="www.digitalmars.com" align="left"></a>
	<p align="right">D Programming Language 1.0</p>


	<div id="headingNav">
	<ul>
	<li><a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Phobos/StdBoxer" title="Read/write comments and feedback">Comments</a></li>
	<li><a href="http://www.digitalmars.com/d/1.0/index.html" title="D Programming Language" class="dlink">D</a></li>
	<li><a href="http://www.digitalmars.com/advancedsearch.html" title="Search Digital Mars web site">Search</a></li>
	<li><a href="http://www.digitalmars.com/" title="www.digitalmars.com">Home</a></li>
	</ul>
	</div>

	<div id="lastupdate">Last update Wed Oct  1 23:47:51 2008</div>
</div>

<!-- -->

<div id="navigation">
    <div class="navblock">
<form method="get" action="http://www.google.com/search">
<div id="searchbox">
<input id="q" name="q" size="10" value="RTL Search" onFocus='if(this.value == "RTL Search"){this.value="";}'>
<input type="hidden" id="domains" name="domains" value="www.digitalmars.com">
<input type="hidden" id="sitesearch" name="sitesearch" value="www.digitalmars.com/d/1.0/phobos">
<input type="hidden" id="sourceid" name="sourceid" value="google-search">
<input type="submit" id="submit" name="submit" value="Go">
</div>
</form>
<div id="toctop">
    <ul>
	<li><a href="http://www.digitalmars.com/d/1.0/index.html" title="D Programming Language">D ...</a></li>
	<li><a href="http://www.digitalmars.com/d/1.0/lex.html" title="D Language Specification">Language ...</a></li>
	<li><a href="phobos.html" title="D Runtime Library">Phobos ...</a></li>
	<li><a href="http://www.digitalmars.com/d/1.0/comparison.html" title="Language Comparisons">Comparisons ...</a></li>
    </ul>
</div>
</div>
    <div class="navblock">
<ul>
<li><a href="index.html" title="Index of all HTML files">Index</a></li>
</ul>
    <ul>
	<li><a href="object.html" title="root of object hierarchy">object</a></li>
    </ul>
    <h2><a href="phobos.html#std" title="D standard modules">std</a></h2>
    <ul>
	<li><a href="std.base64.html" title="Encode/decode base64 format">std.base64</a></li>
	<li><a href="std.bind.html" title="Function argument binding">std.bind</a></li>
	<li><a href="std.bitarray.html" title="Arrays of bits">std.bitarray</a></li>
	<li><a href="std.boxer.html" title="Box/unbox types">std.boxer</a></li>
	<li><a href="std.compiler.html" title="Information about the D compiler implementation">std.compiler</a></li>
	<li><a href="std.conv.html" title="Conversion of strings to integers">std.conv</a></li>
	<li><a href="std.cover.html" title="D coverage analyzer">std.cover</a></li>
	<li><a href="std.cpuid.html" title="CPU identification">std.cpuid</a></li>
	<li><a href="std.ctype.html" title="Simple character classification">std.ctype</a></li>
	<li><a href="std.date.html" title="Date and time functions">std.date</a></li>
	<li><a href="std.demangle.html" title="Demangle D names">std.demangle</a></li>
	<li><a href="std.file.html" title="Basic file operations">std.file</a></li>
	<li><a href="std.format.html" title="Formatted conversions of values to strings">std.format</a></li>
	<li><a href="std.gc.html" title="Control the garbage collector">std.gc</a></li>
	<li><a href="std.intrinsic.html" title="Compiler built in intrinsic functions">std.intrinsic</a></li>
	<li><a href="std.math.html" title="the usual math functions">std.math</a></li>
	<li><a href="std.md5.html" title="Compute MD5 digests">std.md5</a></li>
	<li><a href="std.metastrings.html" title="Metaprogramming with strings">std.metastrings</a></li>
	<li><a href="std.mmfile.html" title="Memory mapped files">std.mmfile</a></li>
	<li><a href="std.openrj.html" title="Basic database">std.openrj</a></li>
	<li><a href="std.outbuffer.html" title="Assemble data into an array of bytes">std.outbuffer</a></li>
	<li><a href="std.outofmemory.html" title="Out of memory exception">std.outofmemory</a></li>
	<li><a href="std.path.html" title="Manipulate file names, path names, etc.">std.path</a></li>
	<li><a href="std.process.html" title="Create/destroy threads">std.process</a></li>
	<li><a href="std.random.html" title="Random number generation">std.random</a></li>
	<li><a href="std.regexp.html" title="regular expressions">std.regexp</a></li>
	<li><a href="std.signals.html" title="Signals">std.signals</a></li>
	<li><a href="std.socket.html" title="Sockets">std.socket</a></li>
	<li><a href="std.socketstream.html" title="Stream for a blocking, connected Socket">std.socketstream</a></li>
	<li><a href="std.stdint.html" title="Integral types for various purposes">std.stdint</a></li>
	<li><a href="std.stdio.html" title="Standard I/O">std.stdio</a></li>
	<li><a href="std.cstream.html" title="Stream I/O">std.cstream</a></li>
	<li><a href="std.stream.html" title="Stream I/O">std.stream</a></li>
	<li><a href="std.string.html" title="Basic string operations">std.string</a></li>
	<li><a href="std.system.html" title="Inquire about the CPU, operating system">std.system</a></li>
	<li><a href="std.thread.html" title="Thread operations">std.thread</a></li>
	<li><a href="std.traits.html" title="Type traits">std.traits</a></li>
	<li><a href="std.typetuple.html" title="Type tuples">std.typetuple</a></li>
	<li><a href="std.uni.html" title="Unicode classification">std.uni</a></li>
	<li><a href="std.uri.html" title="Encode and decode Uniform Resource Identifiers (URIs)">std.uri</a></li>
	<li><a href="std.utf.html" title="Encode and decode utf character encodings">std.utf</a></li>
	<li><a href="std.zip.html" title="Read/write zip archives">std.zip</a></li>
	<li><a href="std.zlib.html" title="Compression / Decompression of data">std.zlib</a></li>
	<li><a href="std.c.fenv.html" title="Floating point environment">std.c.fenv</a></li>
	<li><a href="std.c.locale.html" title="Locale">std.c.locale</a></li>
	<li><a href="std.c.math.html" title="Math">std.c.math</a></li>
	<li><a href="std.c.process.html" title="Process">std.c.process</a></li>
	<li><a href="std.c.stdarg.html" title="Variadic arguments">std.c.stdarg</a></li>
	<li><a href="std.c.stddef.html" title="Standard definitions">std.c.stddef</a></li>
	<li><a href="std.c.stdio.html" title="Standard I/O">std.c.stdio</a></li>
	<li><a href="std.c.stdlib.html" title="Standard library">std.c.stdlib</a></li>
	<li><a href="std.c.string.html" title="Strings">std.c.string</a></li>
	<li><a href="std.c.time.html" title="Time">std.c.time</a></li>
	<li><a href="std.c.wcharh.html" title="Wide characters">std.c.wcharh</a></li>
	<li><a href="std.windows.charset.html" title="Conversion to/from Windows character sets">std.windows.charset</a></li>
	<li><a href="phobos.html#std_windows" title="Modules specific to Windows">std.windows</a></li>
	<li><a href="phobos.html#std_linux" title="Modules specific to Windows">std.linux</a></li>
	<li><a href="phobos.html#std_c_windows" title="C Windows API">std.c.windows</a></li>
	<li><a href="phobos.html#std_c_linux" title="C Linux API">std.c.linux</a></li>
    </ul>
</div>
</div>
<div id="content">
    <h1><a href="./htmlsrc/std.boxer.html">std.boxer</a></h1>
    
This module is a set of types and functions for converting any object &#40;value
 or heap&#41; into a generic box type, allowing the user to pass that object
 around without knowing what's in the box, and then allowing him to recover
 the value afterwards. <br><br>
<b>Example:</b><br><pre class="d_code">

<span class="lc">// Convert the integer 45 into a box.</span>
<span class="i">Box</span> <span class="i">b</span> = <span class="i">box</span>(<span class="n">45</span>);

<span class="lc">// Recover the integer and cast it to real.</span>
<span class="k">real</span> <span class="i">r</span> = <span class="i">unbox</span>!(<span class="k">real</span>)(<span class="i">b</span>);

</pre><br><br> That is the basic interface and will usually be all that you need to
 understand. If it cannot unbox the object to the given type, it throws
 UnboxException. As demonstrated, it uses implicit casts to behave in the exact
 same way that static types behave. So for example, you can unbox from int to
 real, but you cannot unbox from real to int: that would require an explicit
 cast. <br><br> This therefore means that attempting to unbox an int as a string will throw
 an error instead of formatting it. In general, you can call the toString method
 on the box and receive a good result, depending upon whether std.string.format
 accepts it. <br><br> Boxes can be compared to one another and they can be used as keys for
 associative arrays. <br><br> There are also functions for converting to and from arrays of boxes.<br><br>
<b>Example:</b><br><pre class="d_code">

<span class="lc">// Convert arguments into an array of boxes.</span>
<span class="i">Box</span>[] <span class="i">a</span> = <span class="i">boxArray</span>(<span class="n">1</span>, <span class="n">45.4</span>, <span class="sl">"foobar"</span>);

<span class="lc">// Convert an array of boxes back into arguments.</span>
<span class="i">TypeInfo</span>[] <span class="i">arg_types</span>;
<span class="k">void</span>* <span class="i">arg_data</span>;

<span class="i">boxArrayToArguments</span>(<span class="i">a</span>, <span class="i">arg_types</span>, <span class="i">arg_data</span>);

<span class="lc">// Convert the arguments back into boxes using a</span>
<span class="lc">// different form of the function.</span>
<span class="i">a</span> = <span class="i">boxArray</span>(<span class="i">arg_types</span>, <span class="i">arg_data</span>);

</pre>
 One use of this is to support a variadic function more easily and robustly;
 simply call "boxArray&#40;_arguments, _argptr&#41;", then do whatever you need to do
 with the array.<br><br>
<b>Authors:</b><br>
Burton Radons<br><br>
<b>License:</b><br>
Public Domain<br><br>
<span style="color:red">BUGS:</span><br>
<ul>
	<li><a href="http://d.puremagic.com/issues/show_bug.cgi?id=309">Bugzilla 309</a></li>
	<li><a href="http://d.puremagic.com/issues/show_bug.cgi?id=1968">Bugzilla 1968</a></li>
	</ul><br><br>
<dl>
<dt><big>bool <a href="./htmlsrc/std.boxer.html#L120" title="At line 120.">isArrayTypeInfo</a>(TypeInfo <i>type</i>); [private]</big></dt>
<dd>
Return the next type in an array typeinfo, or null if there is none. <br><br></dd>
<dt><big>enum <a href="./htmlsrc/std.boxer.html#L127" title="At line 127.">TypeClass</a>; [private]</big></dt>
<dd>
The type class returned from Box.findTypeClass; the order of entries is important. <br><br>
<dl>
<dt><big><a href="./htmlsrc/std.boxer.html#L129" title="At line 129.">Bool</a></big></dt>
<dd>
&lt; bool <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L130" title="At line 130.">Bit</a></big></dt>
<dd></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L131" title="At line 131.">Integer</a></big></dt>
<dd>
&lt; byte, ubyte, short, ushort, int, uint, long, ulong <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L132" title="At line 132.">Float</a></big></dt>
<dd>
&lt; float, double, real <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L133" title="At line 133.">Complex</a></big></dt>
<dd>
&lt; cfloat, cdouble, creal <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L134" title="At line 134.">Imaginary</a></big></dt>
<dd>
&lt; ifloat, idouble, ireal <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L135" title="At line 135.">Class</a></big></dt>
<dd>
&lt; Inherits from Object <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L136" title="At line 136.">Pointer</a></big></dt>
<dd>
&lt; Pointer type &#40;T *&#41; <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L137" title="At line 137.">Array</a></big></dt>
<dd>
&lt; Array type &#40;T []&#41; <br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L138" title="At line 138.">Other</a></big></dt>
<dd>
&lt; Any other type, such as delegates, function pointers, struct, void... <br><br></dd></dl></dd>
<dt><big>struct <a href="./htmlsrc/std.boxer.html#L149" title="At line 149.">Box</a>;</big></dt>
<dd>
Box is a generic container for objects &#40;both value and heap&#41;, allowing the
 user to box them in a generic form and recover them later.
 A box object contains a value in a generic fashion, allowing it to be
 passed from one place to another without having to know its type.  It is
 created by calling the box function, and you can recover the value by
 instantiating the unbox template.
 <br><br>
<dl>
<dt><big>TypeInfo <a href="./htmlsrc/std.boxer.html#L151" title="At line 151.">p_type</a>; [private]</big></dt>
<dd>
&lt; The type of the contained object. <br><br></dd>
<dt><big>union; [private]</big></dt>
<dd>
<dl>
<dt><big>void* <a href="./htmlsrc/std.boxer.html#L155" title="At line 155.">p_longData</a>;</big></dt>
<dd>
&lt; An array of the contained object. <br><br></dd>
<dt><big>void[8] <a href="./htmlsrc/std.boxer.html#L156" title="At line 156.">p_shortData</a>;</big></dt>
<dd>
&lt; Data used when the object is small. <br><br></dd></dl></dd>
<dt><big>TypeClass <a href="./htmlsrc/std.boxer.html#L159" title="At line 159.">findTypeClass</a>(TypeInfo <i>type</i>); [private, static]</big></dt>
<dd></dd>
<dt><big>bool <a href="./htmlsrc/std.boxer.html#L199" title="At line 199.">unboxable</a>(TypeInfo <i>test</i>);</big></dt>
<dd>
Return whether this value could be unboxed as the given type without throwing. <br><br></dd>
<dt><big>TypeInfo <a href="./htmlsrc/std.boxer.html#L240" title="At line 240.">type</a>();</big></dt>
<dd>
Property for the type contained by the box.
 This is initially null and cannot be assigned directly.
 <br><br>
<b>Returns:</b><br>
the type of the contained object.<br><br></dd>
<dt><big>void[] <a href="./htmlsrc/std.boxer.html#L250" title="At line 250.">data</a>();</big></dt>
<dd>
Property for the data pointer to the value of the box.
 This is initially null and cannot be assigned directly.
 <br><br>
<b>Returns:</b><br>
the data array.<br><br></dd>
<dt><big>char[] <a href="./htmlsrc/std.boxer.html#L262" title="At line 262.">toString</a>();</big></dt>
<dd>
Attempt to convert the boxed value into a string using std.string.format;
 this will throw if that function cannot handle it. If the box is
 uninitialized then this returns "".    
     <br><br></dd>
<dt><big>bool <a href="./htmlsrc/std.boxer.html#L288" title="At line 288.">opEqualsInternal</a>(Box <i>other</i>, bool <i>inverted</i>); [private]</big></dt>
<dd></dd>
<dt><big>bool <a href="./htmlsrc/std.boxer.html#L326" title="At line 326.">opEquals</a>(Box <i>other</i>);</big></dt>
<dd>
Compare this box's value with another box. This implicitly casts if the
 types are different, identical to the regular type system.    
     <br><br></dd>
<dt><big>float <a href="./htmlsrc/std.boxer.html#L331" title="At line 331.">opCmpInternal</a>(Box <i>other</i>, bool <i>inverted</i>); [private]</big></dt>
<dd></dd>
<dt><big>float <a href="./htmlsrc/std.boxer.html#L381" title="At line 381.">opCmp</a>(Box <i>other</i>);</big></dt>
<dd>
Compare this box's value with another box. This implicitly casts if the
 types are different, identical to the regular type system.
     <br><br></dd>
<dt><big>hash_t <a href="./htmlsrc/std.boxer.html#L389" title="At line 389.">toHash</a>();</big></dt>
<dd>
Return the value's hash.
     <br><br></dd></dl></dd>
<dt><big>Box <a href="./htmlsrc/std.boxer.html#L399" title="At line 399.">box</a>(...);</big></dt>
<dd>
Box the single argument passed to the function. If more or fewer than one
 argument is passed, this will assert. 
 <br><br></dd>
<dt><big>Box <a href="./htmlsrc/std.boxer.html#L414" title="At line 414.">box</a>(TypeInfo <i>type</i>, void* <i>data</i>);</big></dt>
<dd>
Box the explicitly-defined object. type must not be null; data must not be
 null if the type's size is greater than zero.
 The data is copied.
 <br><br></dd>
<dt><big>size_t <a href="./htmlsrc/std.boxer.html#L434" title="At line 434.">argumentLength</a>(size_t <i>baseLength</i>); [private]</big></dt>
<dd>
Return the length of an argument in bytes. <br><br></dd>
<dt><big>Box[] <a href="./htmlsrc/std.boxer.html#L442" title="At line 442.">boxArray</a>(TypeInfo[] <i>types</i>, void* <i>data</i>);</big></dt>
<dd>
Convert a list of arguments into a list of boxes.
 <br><br></dd>
<dt><big>Box[] <a href="./htmlsrc/std.boxer.html#L458" title="At line 458.">boxArray</a>(...);</big></dt>
<dd>
Box each argument passed to the function, returning an array of boxes.
 <br><br></dd>
<dt><big>void <a href="./htmlsrc/std.boxer.html#L466" title="At line 466.">boxArrayToArguments</a>(Box[] <i>arguments</i>, out TypeInfo[] <i>types</i>, out void* <i>data</i>);</big></dt>
<dd>
Convert an array of boxes into an array of arguments.
 <br><br></dd>
<dt><big>class <a href="./htmlsrc/std.boxer.html#L491" title="At line 491.">UnboxException</a> : Exception;</big></dt>
<dd>
This class is thrown if unbox is unable to cast the value into the desired
 result.
 <br><br>
<dl>
<dt><big>Box <a href="./htmlsrc/std.boxer.html#L493" title="At line 493.">object</a>;</big></dt>
<dd>
This is the box that the user attempted to unbox.<br><br></dd>
<dt><big>TypeInfo <a href="./htmlsrc/std.boxer.html#L495" title="At line 495.">outputType</a>;</big></dt>
<dd>
This is the type that the user attempted to unbox the value as.<br><br></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L501" title="At line 501.">this</a>(Box <i>object</i>, TypeInfo <i>outputType</i>);</big></dt>
<dd>
Assign parameters and create the message in the form
 <tt>"Could not unbox from type ... to ... ."</tt>
     <br><br></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L510" title="At line 510.">unboxCastReal</a>(T); [private]</big></dt>
<dd>
A generic unboxer for the real numeric types. <br><br>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L512" title="At line 512.">unboxCastReal</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L527" title="At line 527.">unboxCastInteger</a>(T); [private]</big></dt>
<dd>
A generic unboxer for the integral numeric types. <br><br>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L529" title="At line 529.">unboxCastInteger</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L556" title="At line 556.">unboxCastComplex</a>(T); [private]</big></dt>
<dd>
A generic unboxer for the complex numeric types. <br><br>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L558" title="At line 558.">unboxCastComplex</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L579" title="At line 579.">unboxCastImaginary</a>(T); [private]</big></dt>
<dd>
A generic unboxer for the imaginary numeric types. <br><br>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L581" title="At line 581.">unboxCastImaginary</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L617" title="At line 617.">unbox</a>(T);</big></dt>
<dd>
The unbox template takes a type parameter and returns a function that
 takes a box object and returns the specified type.<br><br>
To use it, instantiate the template with the desired result type, and then
 call the function with the box to convert. 
 This will implicitly cast base types as necessary and in a way consistent
 with static types - for example, it will cast a boxed byte into int, but it
 won't cast a boxed float into short.<br><br> <br><br>
<b>Throws:</b><br>
UnboxException if it cannot cast<br><br>
<b>Example:</b><br><pre class="d_code">

 <span class="i">Box</span> <span class="i">b</span> = <span class="i">box</span>(<span class="n">4.5</span>);
 <span class="i">bit</span> <span class="i">u</span> = <span class="i">unboxable</span>!(<span class="k">real</span>)(<span class="i">b</span>); <span class="lc">// This is true.</span>
 <span class="k">real</span> <span class="i">r</span> = <span class="i">unbox</span>!(<span class="k">real</span>)(<span class="i">b</span>);

 <span class="i">Box</span> <span class="i">y</span> = <span class="i">box</span>(<span class="n">4</span>);
 <span class="k">int</span> <span class="i">x</span> = <span class="i">unbox</span>!(<span class="k">int</span>) (<span class="i">y</span>);
 
</pre><br><br>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L619" title="At line 619.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L629" title="At line 629.">unbox</a>(T : byte);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L629" title="At line 629.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L630" title="At line 630.">unbox</a>(T : ubyte);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L630" title="At line 630.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L631" title="At line 631.">unbox</a>(T : short);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L631" title="At line 631.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L632" title="At line 632.">unbox</a>(T : ushort);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L632" title="At line 632.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L633" title="At line 633.">unbox</a>(T : int);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L633" title="At line 633.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L634" title="At line 634.">unbox</a>(T : uint);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L634" title="At line 634.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L635" title="At line 635.">unbox</a>(T : long);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L635" title="At line 635.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L636" title="At line 636.">unbox</a>(T : ulong);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L636" title="At line 636.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L637" title="At line 637.">unbox</a>(T : float);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L637" title="At line 637.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L638" title="At line 638.">unbox</a>(T : double);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L638" title="At line 638.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L639" title="At line 639.">unbox</a>(T : real);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L639" title="At line 639.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L640" title="At line 640.">unbox</a>(T : cfloat);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L640" title="At line 640.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L641" title="At line 641.">unbox</a>(T : cdouble);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L641" title="At line 641.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L642" title="At line 642.">unbox</a>(T : creal);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L642" title="At line 642.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L643" title="At line 643.">unbox</a>(T : ifloat);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L643" title="At line 643.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L644" title="At line 644.">unbox</a>(T : idouble);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L644" title="At line 644.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L645" title="At line 645.">unbox</a>(T : ireal);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L645" title="At line 645.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L647" title="At line 647.">unbox</a>(T : Object);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L649" title="At line 649.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L671" title="At line 671.">unbox</a>(T : T[]);</big></dt>
<dd>
<dl>
<dt><big>T[] <a href="./htmlsrc/std.boxer.html#L673" title="At line 673.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L685" title="At line 685.">unbox</a>(T : T*);</big></dt>
<dd>
<dl>
<dt><big>T* <a href="./htmlsrc/std.boxer.html#L687" title="At line 687.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L702" title="At line 702.">unbox</a>(T : void*);</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L704" title="At line 704.">unbox</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L723" title="At line 723.">unboxable</a>(T);</big></dt>
<dd>
Return whether the value can be unboxed as the given type; if this returns
 false, attempting to do so will throw UnboxException.
 <br><br>
<dl>
<dt><big>bool <a href="./htmlsrc/std.boxer.html#L725" title="At line 725.">unboxable</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big>template <a href="./htmlsrc/std.boxer.html#L732" title="At line 732.">unboxTest</a>(T); [private]</big></dt>
<dd>
<dl>
<dt><big>T <a href="./htmlsrc/std.boxer.html#L734" title="At line 734.">unboxTest</a>(Box <i>value</i>);</big></dt>
<dd></dd></dl></dd>
<dt><big><a href="./htmlsrc/std.boxer.html#L754" title="At line 754.">unittest</a>;</big></dt>
<dd></dd></dl>
    <br><br>
<br><br>
<!-- Google ad -->
<script type="text/javascript"><!--
/**/google_ad_client = "pub-5628673096434613";
/**/google_ad_width = 728;
/**/google_ad_height = 90;
/**/google_ad_format = "728x90_as";
/**/google_ad_channel ="6203743411";
/**/google_page_url = document.location;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>


<div id="copyright">
Copyright &copy; 1999-2008 by Digital Mars, All Rights Reserved |
Page generated by <a href="http://code.google.com/p/dil">dil</a> on Wed Oct  1 23:47:51 2008
</div>

</body>
</html>